﻿@model Category

@{
    ViewBag.Title = "添加商品分类";
}
<div class="bs-docs-header" id="content" tabindex="-1">
    <div class="container">
        <p>发邮件给我们：<a href="mailto:minguiluo@163.com">minguiluo@163.com</a></p>
    </div>
</div>
<div class="container bs-docs-container">
    <hgroup class="title">
        <h3>@Html.Image("Category_32.png")&nbsp;@ViewBag.Title</h3>
    </hgroup>

    @using (Html.BeginForm("AddCategory", "Admin", FormMethod.Post, new { id = "AddCategoryForm" }))
    {
        @Html.ValidationSummary(true)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.TextBoxFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
    }

    <p>
        <span>@Html.ImageSubmitButton("AddCategoryForm", Url.Content("~/Images/Save.png"), "保存", "保存更改")</span>
        <span>&nbsp;</span>
        <span>@Html.ImageActionLink(Url.Content("~/Images/Cancel.png"), "取消添加", "取消添加", "Categories", "Admin")</span>
    </p>

    @section scripts
{
        <script type="text/javascript">
            $(function () {
                $("#Name").focus();
            });
        </script>
    }
</div>